﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using CoreProject.IRepository;
using CoreProject.IService;
using CoreProject.Model;

namespace CoreProject.Service
{
    public class DeptService : BaseService<Department>, IDeptService
    {
        private readonly IDeptRepository _repository;

        public DeptService(IDeptRepository repository) : base(repository)
        {
            this._repository = repository;
        }

        public async Task<(List<Department> list, int count)> GetDeptBypage(string name, int page, int size)
        {
            return await _repository.GetDeptBypage(name, page, size);
        }
    }
}
